<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/V_PLAN_WORK_ORDER_Action.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/V_PLAN_WORK_ORDER_Action.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Order_Id',
                footer: "Foots",
                cnName: '工单下发',
                name: 'workbusiness/V_PLAN_WORK_ORDER_Action',
                url: "/V_PLAN_WORK_ORDER_Action/",
                sortName: "CreateOn"
            });
            const editFormFields = ref({"WorkCenterId":"","IsActivation":""});
            const editFormOptions = ref([[{"dataKey":"线体","data":[],"title":"产线","field":"WorkCenterId","type":"select"},
                               {"dataKey":"工单下发","data":[],"title":"激活工单","field":"IsActivation","type":"select"}]]);
            const searchFormFields = ref({"OrderCode":"","WorkCenterId":"","IsProduction":"","IsActivation":""});
            const searchFormOptions = ref([[{"dataKey":"工单（没有Id）","data":[],"title":"工单","field":"OrderCode","type":"select"},{"dataKey":"线体","data":[],"title":"产线","field":"WorkCenterId","type":"select"},{"dataKey":"排产","data":[],"title":"是否排产","field":"IsProduction","type":"select"},{"dataKey":"工单下发","data":[],"title":"激活工单","field":"IsActivation","type":"select"}]]);
            const columns = ref([{field:'Order_Id',title:'Order_Id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'OrderCode',title:'工单',type:'string',bind:{ key:'工单（没有Id）',data:[]},width:200,align:'left',sort:true},
                       {field:'ProductId',title:'ProductId',type:'string',width:110,hidden:true,align:'left'},
                       {field:'WorkCenterId',title:'产线',type:'string',bind:{ key:'线体',data:[]},width:110,align:'left'},
                       {field:'ProductBOMId',title:'ProductBOMId',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ProcessRouteId',title:'ProcessRouteId',type:'string',width:110,hidden:true,align:'left'},
                       {field:'OrderType',title:'OrderType',type:'string',width:110,hidden:true,align:'left'},
                       {field:'OrderQuantity',title:'OrderQuantity',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'PlanStart',title:'PlanStart',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'PlanEnd',title:'PlanEnd',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'work_order_number',title:'工单序号',type:'string',link:true,width:220,align:'left'},
                       {field:'workpiece_id',title:'workpiece_id',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'priority',title:'priority',type:'int',width:110,hidden:true,align:'left'},
                       {field:'material_id',title:'material_id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'processing_grade',title:'processing_grade',type:'int',width:110,hidden:true,align:'left'},
                       {field:'length',title:'length',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'width',title:'width',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'height',title:'height',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'measure_number',title:'measure_number',type:'string',width:220,hidden:true,align:'left'},
                       {field:'centring_number',title:'centring_number',type:'string',width:220,hidden:true,align:'left'},
                       {field:'make_level_number',title:'make_level_number',type:'string',width:220,hidden:true,align:'left'},
                       {field:'accuracy',title:'accuracy',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'ProductionSeqNumber',title:'排产序号',type:'decimal',width:110,align:'left'},
                       {field:'IsProduction',title:'是否排产',type:'string',bind:{ key:'排产',data:[]},width:110,align:'left'},
                       {field:'process_Status',title:'process_Status',type:'int',width:110,hidden:true,align:'left'},
                       {field:'IsActivation',title:'激活工单',type:'string',bind:{ key:'工单下发',data:[]},width:110,align:'left'},
                       {field:'Status',title:'Status',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateBy',title:'CreateBy',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateOn',title:'CreateOn',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'UpdateBy',title:'UpdateBy',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'LastUpdateOn',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Description',title:'检查信息',type:'string',width:220,align:'left'},
                       {field:'IsDeleted',title:'IsDeleted',type:'bool',width:110,hidden:true,align:'left'},
                       {field:'TopUpSort',title:'TopUpSort',type:'int',width:80,hidden:true,align:'left'},
                       {field:'IsTopUp',title:'IsTopUp',type:'bool',width:110,hidden:true,align:'left'},
                       {field:'OneStatus',title:'OneStatus',type:'int',width:80,hidden:true,align:'left'},
                       {field:'TwoStatus',title:'执行中',type:'int',width:80,align:'left'},
                       {field:'ThreeStatus',title:'ThreeStatus',type:'int',width:80,hidden:true,align:'left'},
                       {field:'FourStatus',title:'异常',type:'int',width:80,align:'left'},
                       {field:'FiveStatus',title:'FiveStatus',type:'int',width:80,hidden:true,align:'left'},
                       {field:'SixStatus',title:'SixStatus',type:'int',width:80,hidden:true,align:'left'},
                       {field:'KnifeOneStatus',title:'需换刀',type:'int',width:80,require:true,align:'left'},
                       {field:'KnifeThreeStatus',title:'程序加工完',type:'int',width:80,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
